home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / dejagnu.lha / dejagnu-1.0.1 / tcl / panic.c < prev    next >
C/C++ Source or Header  |  1993-02-13  |  1KB  |  51 lines

  1. /* 
  2.  * panic.c --
  3.  *
  4.  *    Source code for the "panic" library procedure for Tcl;
  5.  *    individual applications will probably override this with
  6.  *    an application-specific panic procedure.
  7.  *
  8.  * Copyright 1988-1991 Regents of the University of California
  9.  * Permission to use, copy, modify, and distribute this
  10.  * software and its documentation for any purpose and without
  11.  * fee is hereby granted, provided that the above copyright
  12.  * notice appears in all copies.  The University of California
  13.  * makes no representations about the suitability of this
  14.  * software for any purpose.  It is provided "as is" without
  15.  * express or implied warranty.
  16.  */
  17.  
  18. #include <stdio.h>
  19. #include <stdlib.h>
  20.  
  21. /*
  22.  *----------------------------------------------------------------------
  23.  *
  24.  * panic --
  25.  *
  26.  *    Print an error message and kill the process.
  27.  *
  28.  * Results:
  29.  *    None.
  30.  *
  31.  * Side effects:
  32.  *    The process dies, entering the debugger if possible.
  33.  *
  34.  *----------------------------------------------------------------------
  35.  */
  36.  
  37.     /* VARARGS ARGSUSED */
  38. void
  39. panic(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
  40.     char *format;        /* Format string, suitable for passing to
  41.                  * fprintf. */
  42.     char *arg1, *arg2, *arg3;    /* Additional arguments (variable in number)
  43.                  * to pass to fprintf. */
  44.     char *arg4, *arg5, *arg6, *arg7, *arg8;
  45. {
  46.     (void) fprintf(stderr, format, arg1, arg2, arg3, arg4, arg5, arg6,
  47.         arg7, arg8);
  48.     (void) fflush(stderr);
  49.     abort();
  50. }
  51.